home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
MONITOR
/
TURMIT02.ARJ
/
TURMITE.DOC
< prev
next >
Wrap
Text File
|
1992-06-23
|
8KB
|
183 lines
Turmite
The Two-Dimensional Turing Machine
Copyright (C) 1992 Steve Iltis, All Rights Reserved
Table of Contents
Introduction
System requirements
Turmite operation
Options
Distribution rules
How to contact the author
Acknowledgements
Disclaimer
Frequently asked questions
Introduction
Turmite is a project that I started work on more than two years ago, but then I
got too busy to add all the neat features I thought it should have. This
program is not originally mine; it was inspired by a Computer Recreations
article in the September 1989 issue of Scientific American entitled "Turing
machines and tur-mites make tracks on a plane". I have added some features
that I find interesting, especially the ability to load .GIF pictures, then set
the turmite free on the picture, allowing it to eat, destroy, or encode the
picture (depending on your point of view).
System requirements
IBM compatible with 275K free
MS-DOS 3.3 or higher or DR-DOS 5.0 or higher
VGA or SVGA card and monitor
WARNING: DO NOT USE TURMITE ON ANY MONITOR OTHER THAN VGA OR SVGA. USE OF THIS
PROGRAM ON OTHER VIDEO CARDS AND MONITORS MAY HAVE UNPREDICTABLE RESULTS. IF
YOU ARE UNSURE OF THE TYPE OF MONITOR YOU HAVE, DO NOT USE THIS PROGRAM.
Turmite will actually run with much less than 275K free, but loading .GIFs
requires that you have about 275K or more free memory. This might vary from
computer to computer, depending on the speed of the computer and the speed of
the video card, as Turmite uses this memory for buffering as it loads the
pictures from disk to video memory. If there is not enough memory, the picture
will load, but it will be slightly garbled.
Turmite was developed using the following hardware and software:
GEO 386/25
Trident 8900 1MB video card
SVGA monitor
DR DOS 6.0
QEMM 6.02 (leaving 600K free)
Borland C++ 2.0
Gif Library version 1.2 by Gershon Elber
SVGA BGI version 3.1 by Jordan Hargrave
Turmite Operation
When Turmite is run, it will first ask you to input the number of colors to use
and the video mode to use. Valid values for the number of colors range from 2
to 256, inclusive. Turmite will offer video modes of size 320x200, 640x400,
640x480, 800x600, and 1024x768. (Of course, you can only use the ones your
video card accepts.) Once these values are accepted, Turmite starts
to do its thing. What it actually does is increase or decrease the color of
the current pixel according to certain rules, then goes on to the next pixel.
The turmite will turn either to the right or to the left when advancing to the
next pixel; this also depends on the color of the current pixel. [Press the
spacebar to pause the Turmite in action; hold down the spacebar for slow
motion.] My favorite defaults for the values are 16 colors in 320x200 mode. I
use 320x200 mode since the pixels are bigger, which makes the action easier to
watch. I use only 16 colors since it takes much longer for the Turmite to draw
a picture with 256 colors, since it has to cycle through all 256 colors before
it can grow.
After playing with Turmite for a while, you might notice a relationship between
the number of colors and the pattern Turmite follows. Here are my
observations:
1) With a number of colors that is even, but not divisible by 4 (i.e.
2, 6, 10, 14, ... 254) the turmite will trail off in either the forward or
backward direction.
2) With a number of colors one less than a number divisible by 4 (i.e.
3, 7, 11, 15, ... 255) the turmite will trail off in the forward direction, and
just grow garbage in the backward direction.
3) With a number of colors divisible by 4 (i.e. 4, 8, 12, 16, ... 256)
the Turmite generates a pattern symmetrical along the vertical at the center of
the screen.
4) With a number of colors one more than a number divisible by 4 (i.e.
5, 9, 13, 17, ... 253) the turmite will just grow garbage in the forward
direction, and in the backward direction will eventually trail off.
Note that the Turmite wraps around to the other side of the screen when it
reaches the edge of the screen.
Options
Once the turmite has started to do its thing, the following keys are used to
change what the turmite is doing:
+ makes the turmite move in the forward direction, the default.
- makes the turmite move in the backward direction, retracing its steps.
When the turmite returns to the original picture (the blank screen),
it will pause. To continue in the backward direction, press '-'
again, or press '+' to continue in the forward direction.
r reverses the direction of the turmite. If the turmite is moving
forward, 'r' makes it move backward, and visa versa.
spacebar pauses the turmite. Press the '+' or '-' key to continue in the
appropriate direction. If you are not sure the direction it was
going, press 'r' twice. Also, hold down the spacebar for slow
motion turmite.
l load picture. When it asks for a filename, include the full path,
i.e. c:\pics\porsche.gif. Turmite is able to read .GIFs of most
sizes, but will not correctly read a .GIF if it has been modified by
GIFLITE, a program that compresses .GIFs.
Esc exits the program.
Distribution Rules
This program is distributed as freeware, which means that I do not demand
payment for the use of this program, but I do retain my intellectual property
rights. Turmite may be freely copied and distributed but may not be sold.
How to contact the author
Steve Iltis
School address: Internet address: Permanent address:
Lovett College iltiss@owlnet.rice.edu 1119 Curlew
P.O. Box 2671 San Antonio, TX 78213
Houston, TX 77252 (512) 349-2342
(713) 630-8590
During the months of September through April I may be reached via
Internet or my school address. During May through August I may be
reached at my permanent address, and possibly through Internet.
Acknowledgements
Thanks go out to the authors of the following programs:
program: SVGABG31.ZIP
description: SVGA BGI video drivers
author: Jordan Hargrave
Internet: jh5y@andrew.cmu.edu
address: 1000 Morewood Ave, Box #3277
Pittsburgh, PA 15213
(412) 268-4493
program: GIFLIB12.ZIP
description: C source libraries used to load and save .GIFs
author: Gershon Elber
Internet: gershon@cs.utah.edu
Disclaimer
The author is not responsible for any damage done to computer or the computer
user while using Turmite.
Frequently asked questions
Q1) The program will not run. I keep getting the message:
BGI Error: Graphics not initialized (use 'initgraph')
A1) Make sure that the file SVGA256.BGI is in the current directory when
running Turmite. This is not the only reason for this error (sometimes it
occurs randomly), but it is the most common reason for this error.
Q2) Why can't I load pictures more than 2048 pixels high?
A2) Actually, this is an arbitrarily set limit. [I figure most people will
never need to load a picture this size.] Without this limit, GIFs modified by
GIFLITE would cause the computer to lock up, since GIFLITE changes the height
to something like 21504 pixels.
Q3) Why does the computer lock up or give a 'BGI Error' when loading a second
picture?
A3) I am working to fix this. Temporary solution: load a picture and let the
turmite go to work; when you want to load a new picture, exit first, run the
program again, then load another picture.